<template>
	<view>
		<view class="wp">
			<view class="head">当前项目包含页面</view>
			<view class="line"></view>
			<view class="list">

				<!-- #ifdef MP-WEIXIN -->
				<!-- <button class="btn" @getphonenumber="getPhoneNumber" open-type="getPhoneNumber">手机号码授权登录</button> -->
				<!-- #endif -->
				<view class="li" v-for="item of pages" :key="item.path">
					<navigator class="a" :url="'/' + item.path" hover-class="hover"
						:open-type="item.tab ? 'switchTab' : 'navigate'">
						{{ item.tit || item.style.navigationBarTitleText || '' }}
					</navigator>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				"pages": [{
						tab: true,
						"path": "pages/index/index",
						"style": {
							"navigationBarTitleText": "首页",
							"navigationStyle": "custom"
						}
					},

					{ //1.4.1.1订单-封闭停车场
						tab: true,
						"path": "pages/order/order",
						"style": {
							"navigationBarTitleText": "订单页面",
							"navigationStyle": "custom"
						}
					},
					{
						tab: true,
						"path": "pages/realTimeInfo/realTimeInfo",
						"style": {
							"navigationBarTitleText": "咨讯",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/newsDetail/newsDetail",
						"style": {
							"navigationBarTitleText": "资讯详情",
							"navigationStyle": "custom"
						}
					},
					{
						tab: true,
						"path": "pages/my/my",
						"style": {
							"navigationBarTitleText": "我的",
							"navigationStyle": "custom"
						}
					},
					{ //1.4.1.2订单-封闭停车场-订单详情-免费离开
						"path": "pages/order/det1",
						"style": {
							"navigationBarTitleText": "订单详情",
							"navigationStyle": "custom"
						}
					},
					{ //1.4.1.3订单-封闭停车场-订单详情-付费离开
						"path": "pages/order/det2",
						"style": {
							"navigationBarTitleText": "订单详情",
							"navigationStyle": "custom"
						}
					},
					{ //1.4.1.4订单-封闭停车场-订单详情-欠费离开
						"path": "pages/order/det3",
						"style": {
							"navigationBarTitleText": "订单详情",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.0更多服务
						"path": "pages/service/service",
						"style": {
							"navigationBarTitleText": "更多服务",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.1.1钱包-充值
						"path": "pages/walletRecharge/walletRecharge",
						"style": {
							"navigationBarTitleText": "钱包-充值",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.1.3.1钱包-充值记录
						"path": "pages/walletRecords/walletRecords",
						"style": {
							"navigationBarTitleText": "充值记录",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.2.1.1停车预约
						"path": "pages/parkingReservation/parkingReservation",
						"style": {
							"navigationBarTitleText": "停车预约",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.2.1.2预约停车-现在预约
						"path": "pages/parkingReservationForm/parkingReservationForm",
						"style": {
							"navigationBarTitleText": "现在预约",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.2.1.6预约停车-现在预约-付费
						"path": "pages/parkingReservationPayment/parkingReservationPayment",
						"style": {
							"navigationBarTitleText": "现在预约-付费",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.2.1.8预约停车-现在预约-预约成功
						"path": "pages/parkingReservationState1/parkingReservationState1",
						"style": {
							"navigationBarTitleText": "预约停车-现在预约-预约成功",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.2.1.8预约停车-现在预约-预约失败
						"path": "pages/parkingReservationState2/parkingReservationState2",
						"style": {
							"navigationBarTitleText": "预约停车-现在预约-预约失败",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.2.2.2预约记录-预约记录-详情
						"path": "pages/parkingReservationDet/parkingReservationDet",
						"style": {
							"navigationBarTitleText": "预约详情",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.3.1积分商城
						"path": "pages/pointsMall/pointsMall",
						"style": {
							"navigationBarTitleText": "积分商城",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.4.1车后市场
						"path": "pages/carMarket/carMarket",
						"style": {
							"navigationBarTitleText": "车后市场",
							"navigationStyle": "custom"
						}
					},
					{ //2.9.4.2车后市场-门店详情
						"path": "pages/carMarketDet/carMarketDet",
						"style": {
							"navigationBarTitleText": "门店详情",
							"navigationStyle": "custom"
						}
					},
					// lke
					{ //2.1.0车辆管理
						"path": "pages/vehiclemanagement/vehiclemanagement",
						"style": {
							"navigationBarTitleText": "车辆管理",
							"navigationStyle": "custom"
						}
					},

					{ //2.1.1.1车辆管理-车牌绑定
						"path": "pages/vehiclemanagement/licenseplatebinding",
						"style": {
							"navigationBarTitleText": "车辆管理-车牌绑定",
							"navigationStyle": "custom"
						}
					},
					{ //2.1.1.4.1车辆管理-申请解绑
						"path": "pages/vehiclemanagement/requestforrelease",
						"style": {
							"navigationBarTitleText": "车辆管理-申请解绑",
							"navigationStyle": "custom"
						}
					},
					{ //2.1.2.1车辆管理-车辆认证
						"path": "pages/vehiclemanagement/certification",
						"style": {
							"navigationBarTitleText": "车辆管理-车辆认证",
							"navigationStyle": "custom"
						}
					},
					{ //2.4.1.1联系客服-文字输入
						"path": "pages/contactcustomer/textinput",
						"style": {
							"navigationBarTitleText": "联系客服-文字输入",
							"navigationStyle": "custom"
						}
					},

					// lke end
					{ //登录
						"path": "pages/login/login",
						"style": {
							"navigationBarTitleText": "登录",
							"navigationStyle": "custom"
						}
					},
					{ //1.4.4.1订单-订单详情-支付成功
						"path": "pages/order/paysucc",
						"style": {
							"navigationBarTitleText": "支付成功",
							"navigationStyle": "custom"
						}
					},
					{ //1.4.4.2订单-订单详情-支付失败
						"path": "pages/order/payfail",
						"style": {
							"navigationBarTitleText": "支付失败",
							"navigationStyle": "custom"
						}
					},
					{ //1.4.5申诉
						"path": "pages/order/appeal",
						"style": {
							"navigationBarTitleText": "申诉",
							"navigationStyle": "custom"
						}
					},
					{ //2.5.1停车缴费-选省份
						"path": "pages/park-pay/park-pay",
						"style": {
							"navigationBarTitleText": "停车缴费-选省份",
							"navigationStyle": "custom"
						}
					},
					{ //2.5.4停车缴费-订单详情
						"path": "pages/park-pay/parkdet",
						"style": {
							"navigationBarTitleText": "停车缴费-订单详情",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/privacyProtection/privacyProtection",
						"style": {
							"navigationBarTitleText": "隐私保护",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/nonDisclosureAgreement/nonDisclosureAgreement",
						"style": {
							"navigationBarTitleText": "保密协议",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/aboutUs/aboutUs",
						"style": {
							"navigationBarTitleText": "关于我们",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/helpInstructions/helpInstructions",
						"style": {
							"navigationBarTitleText": "帮助说明",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/activation/activation",
						"style": {
							"navigationBarTitleText": "无感开通",
							"navigationStyle": "custom"
						}
					},
					{ //2.10.3.1我的申诉-已成功
						"path": "pages/myappeal/myappeal",
						"style": {
							"navigationBarTitleText": "我的申诉",
							"navigationStyle": "custom"
						}
					},
					{ //2.10.3.3我的申诉-申诉成功详情
						"path": "pages/myappeal/appeal-succ",
						"style": {
							"navigationBarTitleText": "我的申诉-申诉成功详情",
							"navigationStyle": "custom"
						}
					},
					{ //2.10.3.4我的申诉-申诉驳回详情
						"path": "pages/myappeal/appeal-fail",
						"style": {
							"navigationBarTitleText": "我的申诉-申诉驳回详情",
							"navigationStyle": "custom"
						}
					},
					{ //2.11.1停车缴费详情
						"path": "pages/order/payment-det",
						"style": {
							"navigationBarTitleText": "停车缴费",
							"navigationStyle": "custom"
						}
					},
					{ //2.6.1.0线上月卡-停车场
						"path": "pages/monthlycard/monthlycard",
						"style": {
							"navigationBarTitleText": "线上月卡",
							"navigationStyle": "custom"
						}
					},
					{ //2.6.1.1线上月卡-选择停车场-未选
						"path": "pages/monthlycard/select",
						"style": {
							"navigationBarTitleText": "选择停车场",
							"navigationStyle": "custom"
						}
					},
					{ //2.6.3.1线上月卡-选择路内停车场-已选
						"path": "pages/monthlycard/select2",
						"style": {
							"navigationBarTitleText": "选择路内停车场",
							"navigationStyle": "custom"
						}
					},
					{ //2.6.4线上月卡-选择停车场-停车场详情
						"path": "pages/monthlycard/det",
						"style": {
							"navigationBarTitleText": "停车场详情",
							"navigationStyle": "custom"
						}
					},
					{ //2.6.5.1包月记录-进行中
						"path": "pages/monthlycard/record",
						"style": {
							"navigationBarTitleText": "包月记录",
							"navigationStyle": "custom"
						}
					},
					{ //2.7.1欠费补缴-路内停车点欠费
						"path": "pages/order/overduepayment",
						"style": {
							"navigationBarTitleText": "欠费补缴",
							"navigationStyle": "custom"
						}
					},
					{ //2.7.3.2欠费补缴-多笔订单一起支付
						"path": "pages/order/bujiao",
						"style": {
							"navigationBarTitleText": "欠费补缴",
							"navigationStyle": "custom"
						}
					},
					{ //2.4.2联系客服-订单记录
						"path": "pages/helpInstructions/recordlist",
						"style": {
							"navigationBarTitleText": "联系客服-订单记录",
							"navigationStyle": "custom"
						}
					},
					{ //1.3.1找车位-全部+1.3.2.1找车位-停车场+1.3.3.1找车位-路边停车+1.3.4.1找车位-充电
						"path": "pages/parkingPlace/parkingList",
						"style": {
							"navigationBarTitleText": "找车位",
							"navigationStyle": "custom"
						}
					},
					{ //1.3.2.2找车位-停车场详情
						"path": "pages/parkingPlace/parkingDetail1",
						"style": {
							"navigationBarTitleText": "停车场详情",
							"navigationStyle": "custom"
						}
					}, { //1.3.3.2找车位-路段详情
						"path": "pages/parkingPlace/parkingDetail2",
						"style": {
							"navigationBarTitleText": "路边停车详情",
							"navigationStyle": "custom"
						}
					}, { //1.3.4.2找车位-充电详情
						"path": "pages/parkingPlace/parkingDetail3",
						"style": {
							"navigationBarTitleText": "充电详情",
							"navigationStyle": "custom"
						}
					}, { //2.3.1充电网点
						"path": "pages/outlets/list",
						"style": {
							"navigationBarTitleText": "充电网点",
							"navigationStyle": "custom"
						}
					}, { //2.3.3充电网点详情
						"path": "pages/outlets/detail",
						"style": {
							"navigationBarTitleText": "充电网点详情",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/selectNumber/selectNumber",
						"style": {
							"navigationBarTitleText": "选择车牌号码",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/electronicInvoice/electronicInvoice",
						"style": {
							"navigationBarTitleText": "电子发票",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/selectMoney/selectMoney",
						"style": {
							"navigationBarTitleText": "选择开票金额",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/issueInvoice/issueInvoice",
						"style": {
							"navigationBarTitleText": "开具发票默认",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/invoiceHelp/invoiceHelp",
						"style": {
							"navigationBarTitleText": "开票帮助",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/myInvoice/myInvoice",
						"style": {
							"navigationBarTitleText": "我的发票抬头",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/editInvoice/editInvoice",
						"style": {
							"navigationBarTitleText": "我的发票抬头-编辑添加",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/invoiceHistory/invoiceHistory",
						"style": {
							"navigationBarTitleText": "开票历史",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/invoiceDetail/invoiceDetail",
						"style": {
							"navigationBarTitleText": "开票历史-发票详情默认",
							"navigationStyle": "custom"
						}
					},
					{
						"path": "pages/coupon/coupon",
						"style": {
							"navigationBarTitleText": "优惠卷",
							"navigationStyle": "custom",
							"navigationBarTextStyle": "black"
						}
					},
					{
						"path": "pages/mybill/mybill",
						"style": {
							"navigationBarTitleText": "我的账单",
							"navigationStyle": "custom",
							"navigationBarTextStyle": "black"
						}
					},
					{
						"path": "pages/my/blank",
						"style": {
							"navigationBarTitleText": "正在开发",
							"navigationStyle": "custom",
							"navigationBarTextStyle": "black"
						}
					}


				],
			}
		},
		onLoad() {
			// 分类
			// this.getcatelist();

			// 商品列表
			// this.getproduct();

			// 首页店铺+商品
			// this.getproductshop();


			// banner广告
			// this.getadbycateid();

			// 独立广告
			// this.getadbyid_left()
			// this.getadbyid_right_1()
			// this.getadbyid_right_2()

			// 加购
			// this.addshopcart();

			// 查询购物车
			// this.getshopcart();

			// 验证码
			// this.sendsms();

			// 注册手机号
			// this.setuser();

			// 获取openid
			// this.getopenid();

			// 获取用户信息
			// this.getuser();

			// 读取文章
			// this.getartbyid()


		},
		methods: {

			// 分类
			async getcatelist() {
				try {
					let data = {

					}
					let res = await this.$request.home.getcatelist(data);
					console.log(res);
				} catch (error) {

				}
			},
			// 商品列表
			async getproduct() {
				try {
					let data = {

					}
					let res = await this.$request.home.getproduct(data);
					console.log(res);
				} catch (error) {

				}
			},
			// 首页店铺+商品
			async getproductshop() {
				try {
					let data = {

					}
					let res = await this.$request.home.getproductshop(data);
					console.log(res);
				} catch (error) {

				}
			},
			// banner广告
			async getadbycateid() {
				try {
					let data = {

					}
					let res = await this.$request.home.getadbycateid(data);
					console.log(res);
				} catch (error) {

				}
			},
			// 独立广告
			async getadbyid_left() {
				try {
					let data = {

					}
					let res = await this.$request.home.getadbyid_left(data);
					console.log(res);
				} catch (error) {

				}
			},
			// 独立广告
			async getadbyid_right_1() {
				try {
					let data = {

					}
					let res = await this.$request.home.getadbyid_right_1(data);
					console.log(res);
				} catch (error) {

				}
			},
			// 独立广告
			async getadbyid_right_2() {
				try {
					let data = {

					}
					let res = await this.$request.home.getadbyid_right_2(data);
					console.log(res);
				} catch (error) {

				}
			},

			// 加购
			async addshopcart() {
				try {
					let data = {
						pid: 2,
						count: 1,
						hid: 3
					}
					let res = await this.$request.home.addshopcart(data);
				} catch (error) {
					console.log(error);
				}
			},

			// 查询购物车
			async getshopcart() {
				try {
					let data = {}
					let res = await this.$request.home.getshopcart(data);
				} catch (error) {
					console.log(error);
				}
			},

			// 验证码
			async sendsms() {
				try {
					let data = {
						tel: '13233907875'
					}
					let res = await this.$request.home.sendsms(data);
				} catch (error) {
					console.log(error);
				}
			},

			// 注册手机号
			async setuser() {
				try {
					let openid = uni.getStorageSync('openid');
					let usercode = uni.getStorageSync('usercode') || '';
					let data = {
						tel: '13233907875',
						openid,
						usercode
					}
					let res = await this.$request.home.setuser(data);
					console.log(res);
				} catch (error) {
					console.log(error);
				}
			},

			// 获取openid
			getopenid() {
				/* #ifdef MP-WEIXIN */
				uni.login({
					provider: 'weixin', //使用微信登录
					success: async (loginRes) => {
						try {
							let data = {
								code: loginRes.code
							}
							let res = await this.$request.home.getopenid(data);
							let openidRes = JSON.parse(res)
							uni.setStorageSync('openid', openidRes.openid)
						} catch (error) {

						}
					}
				});
				/* #endif */
			},

			// 授权手机号
			async getPhoneNumber(e) {
				try {
					if (e.detail.errMsg == "getPhoneNumber:ok") {
						let code = e.detail.code;
						let openid = uni.getStorageSync('openid');
						let usercode = uni.getStorageSync('usercode') || '';

						let data = {
							code: code,
							usercode,
							openid: openid,
							query: {
								code: code,
								usercode,
								openid: openid,

							}
						}
						let res = await this.$request.home.getel(data);
					}
				} catch (error) {
					console.log(error);
				}
			},

			// 获取用户信息
			async getuser() {
				try {
					/* #ifdef MP-WEIXIN */
					let openid = uni.getStorageSync('openid')

					let data = {
						query: {
							openid: openid,
						}
					}
					/* #endif */


					let res = await this.$request.home.getuser(data);
				} catch (error) {
					console.log(error);
				}
			},

			// 读取文章
			async getartbyid() {
				try {
					// 个人信息收集单3 ,隐私条款2 注意协议1
					let data = {
						id: 1
					}
					let res = await this.$request.home.getartbyid(data);
					console.log(res);
				} catch (error) {

				}
			},

		}
	}
</script>

<style scoped>
	page {
		background: #333;
		color: #6f828d;
		font: 14px/1.5 sans-serif;
		text-align: center;
	}

	.a {
		color: #026eba;
		text-decoration: none;
		-webkit-transition: all 0.3s ease-out;
		-moz-transition: all 0.3s ease-out;
		-o-transition: all 0.3s ease-out;
		transition: all 0.3s ease-out;
	}

	.a:visited {
		color: #999;
	}

	.hover {
		background: #2ea1f2;
		color: #fff;
	}

	.wp {
		margin: 0 auto;
		width: 480px;
		min-width: 320px;
		min-height: 100vh;
		background: #fff;
	}

	.head {
		height: 80px;
		line-height: 80px;
		font-size: 20px;
		background: url();
	}

	.line {
		margin: 1px 0;
		height: 2px;
		background: url();
	}

	.list,
	.list .li {
		overflow: hidden;
		margin: 0;
		padding: 0;
		text-align: left;
		list-style: none;
	}

	.list .a {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		display: block;
		padding: 12px 20px;
		border-bottom: 1px solid #f0f0f0;
	}

	@media only screen and (max-width: 480px) {
		.wp {
			width: 100%;
		}
	}
</style>
